<!DOCTYPE html>












  


<html class="theme-next gemini use-motion" lang="zh-CN">
<head><meta name="generator" content="Hexo 3.9.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">












<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">






















<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/css/main.css?v=6.4.0" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png?v=6.4.0">


  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png?v=6.4.0">


  <link rel="mask-icon" href="/images/logo.svg?v=6.4.0" color="#222">









<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/',
    scheme: 'Gemini',
    version: '6.4.0',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: false,
    fastclick: false,
    lazyload: false,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    algolia: {
      applicationID: 'CSXZLYKER1',
      apiKey: 'ed0357b28f9389115502dc05a109303a',
      indexName: 'wudong.tech',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"我们没有找到任何搜索结果: ${query}","hits_stats":"找到约${hits}条结果（用时${time}ms）"}
    }
  };
</script>


  




  <meta name="description" content="背景&amp;emsp;&amp;emsp;作者搭建个人博客的时候，用到第三方码云的认证（OAuth）服务，其中获取token的请求必须是post，如果在前端直接调用（https://gitee.com/oauth/token）的话，会出现跨域请求。最后作者在自己购买的vps上，安装了nginx，利用nginx的反向代理来跨域。同时为了提供给其他的人用，所以需要配置请求是可以直接跨域访问的。下面给出nginx中的">
<meta name="keywords" content="Nginx,跨域,第三方认证">
<meta property="og:type" content="article">
<meta property="og:title" content="Nginx配置码云token跨域请求">
<meta property="og:url" content="https://wudong.tech/2018/08/31/Nginx配置跨域请求/index.html">
<meta property="og:site_name" content="吴栋的博客">
<meta property="og:description" content="背景&amp;emsp;&amp;emsp;作者搭建个人博客的时候，用到第三方码云的认证（OAuth）服务，其中获取token的请求必须是post，如果在前端直接调用（https://gitee.com/oauth/token）的话，会出现跨域请求。最后作者在自己购买的vps上，安装了nginx，利用nginx的反向代理来跨域。同时为了提供给其他的人用，所以需要配置请求是可以直接跨域访问的。下面给出nginx中的">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2022-10-16T06:18:15.753Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Nginx配置码云token跨域请求">
<meta name="twitter:description" content="背景&amp;emsp;&amp;emsp;作者搭建个人博客的时候，用到第三方码云的认证（OAuth）服务，其中获取token的请求必须是post，如果在前端直接调用（https://gitee.com/oauth/token）的话，会出现跨域请求。最后作者在自己购买的vps上，安装了nginx，利用nginx的反向代理来跨域。同时为了提供给其他的人用，所以需要配置请求是可以直接跨域访问的。下面给出nginx中的">






  <link rel="canonical" href="https://wudong.tech/2018/08/31/Nginx配置跨域请求/">



<script type="text/javascript" id="page.configurations">
  CONFIG.page = {
    sidebar: "",
  };
</script>

  <title>Nginx配置码云token跨域请求 | 吴栋的博客</title>
  









  <noscript>
  <style type="text/css">
    .use-motion .motion-element,
    .use-motion .brand,
    .use-motion .menu-item,
    .sidebar-inner,
    .use-motion .post-block,
    .use-motion .pagination,
    .use-motion .comments,
    .use-motion .post-header,
    .use-motion .post-body,
    .use-motion .collection-title { opacity: initial; }

    .use-motion .logo,
    .use-motion .site-title,
    .use-motion .site-subtitle {
      opacity: initial;
      top: initial;
    }

    .use-motion {
      .logo-line-before i { left: initial; }
      .logo-line-after i { right: initial; }
    }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-CN">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">吴栋的博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
    
      
        <p class="site-subtitle">非正经菜鸟程序员</p>
      
    
  </div>

  <div class="site-nav-toggle">
    <button aria-label="切换导航栏">
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>



<nav class="site-nav">
  
    <ul id="menu" class="menu">
      
        
        
        
          
          <li class="menu-item menu-item-home">
    <a href="/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-home"></i> <br>首页</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-archives">
    <a href="/archives/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>归档</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-categories">
    <a href="/categories/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-th"></i> <br>分类</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-tags">
    <a href="/tags/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>标签</a>
  </li>
        
        
        
          
          <li class="menu-item menu-item-about">
    <a href="/about/" rel="section">
      <i class="menu-item-icon fa fa-fw fa-user"></i> <br>关于</a>
  </li>

      
      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br>搜索</a>
        </li>
      
    </ul>
  

  

  
    <div class="site-search">
      
  
  <div class="algolia-popup popup search-popup">
    <div class="algolia-search">
      <div class="algolia-search-input-icon">
        <i class="fa fa-search"></i>
      </div>
      <div class="algolia-search-input" id="algolia-search-input"></div>
    </div>

    <div class="algolia-results">
      <div id="algolia-stats"></div>
      <div id="algolia-hits"></div>
      <div id="algolia-pagination" class="algolia-pagination"></div>
    </div>

    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
  </div>




    </div>
  
</nav>



  



</div>
    </header>

    


    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          
            

          
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://wudong.tech/2018/08/31/Nginx配置跨域请求/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="吴栋">
      <meta itemprop="description" content="技术博客，主攻Java，Python，nodeJS">
      <meta itemprop="image" content="https://wudong-tech.oss-cn-beijing.aliyuncs.com/Hexo%E5%92%8C%E7%A0%81%E4%BA%91%E6%90%AD%E5%BB%BA%E5%B1%9E%E4%BA%8E%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E5%BD%A4%E5%BD%A41.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="吴栋的博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">Nginx配置码云token跨域请求
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">

            
            
            

            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              

              
                
              

              <time title="创建时间：2018-08-31 17:20:06" itemprop="dateCreated datePublished" datetime="2018-08-31T17:20:06+08:00">2018-08-31</time>
            

            
              

              
                
                <span class="post-meta-divider">|</span>
                

                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                
                  <span class="post-meta-item-text">更新于</span>
                
                <time title="修改时间：2022-10-16 14:18:15" itemprop="dateModified" datetime="2022-10-16T14:18:15+08:00">2022-10-16</time>
              
            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing"><a href="/categories/个人建站/" itemprop="url" rel="index"><span itemprop="name">个人建站</span></a></span>

                
                
              
            </span>
          

          
            
          

          
          

          
            <span class="post-meta-divider">|</span>
            <span class="post-meta-item-icon">
            <i class="fa fa-eye"></i>
             阅读次数： 
            <span class="busuanzi-value" id="busuanzi_value_page_pv"></span>
            </span>
          

          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="背景"><a href="#背景" class="headerlink" title="背景"></a>背景</h1><p>&emsp;&emsp;作者搭建个人博客的时候，用到第三方码云的认证（OAuth）服务，其中获取token的请求必须是post，如果在前端直接调用（<span><a href="https://gitee.com/oauth/token" target="_blank" rel="noopener">https://gitee.com/oauth/token</a></span>）的话，会出现跨域请求。最后作者在自己购买的vps上，安装了nginx，利用nginx的反向代理来跨域。同时为了提供给其他的人用，所以需要配置请求是可以直接跨域访问的。下面给出nginx中的配置：<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line">location /token &#123;</span><br><span class="line">  set $cors_origin &quot;&quot;;</span><br><span class="line">  if ($http_origin ~* &quot;^https://eillott.gitee.io$&quot;) &#123;</span><br><span class="line">          set $cors_origin $http_origin;</span><br><span class="line">  &#125;</span><br><span class="line">  add_header &apos;Access-Control-Allow-Methods&apos; &apos;GET,OPTIONS,PUT,DELETE&apos; always;</span><br><span class="line">  add_header &apos;Access-Control-Allow-Credentials&apos; &apos;true&apos; always;</span><br><span class="line">  add_header &apos;Access-Control-Allow-Origin&apos; &apos;$cors_origin&apos; always;</span><br><span class="line">  add_header &apos;Access-Control-Allow-Headers&apos; &apos;Authorization,DNT,User-Agent,Keep-Alive,Content-Type,accept,origin,X-Requested-With&apos; always;</span><br><span class="line">  if ($request_method = OPTIONS ) &#123;</span><br><span class="line">      return 200;</span><br><span class="line">  &#125;</span><br><span class="line">  proxy_pass https://gitee.com/oauth/token;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<a id="more"></a>
<h1 id="Http请求Option"><a href="#Http请求Option" class="headerlink" title="Http请求Option"></a>Http请求Option</h1><p>&emsp;&emsp;据RFC2616标准（现行的HTTP/1.1）得知，通常有以下8种方法：OPTIONS、GET、HEAD、POST、PUT、DELETE、TRACE和CONNECT。  </p>
<blockquote style="border-left: 4px solid red;background: aqua;">其中OPTION的方法主要用途有两种<br><br>1. 获取服务器支持的HTTP请求方法；也是黑客经常使用的方法。<br><br>2. 用来检查服务器的性能。例如：AJAX进行跨域请求时的预检，需要向另外一个域名的资源发送一个HTTP OPTIONS请求头，用以判断实际发送的请求是否安全。</blockquote>

<h1 id="Http跨域请求"><a href="#Http跨域请求" class="headerlink" title="Http跨域请求"></a>Http跨域请求</h1><p>&emsp;&emsp;http跨域请求一般处理的方案有：1. 使用jsonp。2. 使用CORS(跨域资源共享)。</p>
<p>&emsp;&emsp;jsonp就不介绍了，主要说下CORS，这是一种网络浏览器的技术规范，它为Web服务器定义了一种方式，允许网页从不同的域访问其资源。而这种访问是被同源策略所禁止的。CORS系统定义了一种浏览器和服务器交互的方式来确定是否允许跨域请求。当前浏览器基本都支持。  </p>
<p>&emsp;&emsp;1. 前端<br>&emsp;&emsp;客户端使用XmlHttpRequest发起Ajax请求。</p>
<p>&emsp;&emsp;2. 服务器端<br>&emsp;&emsp;如果服务器端未做任何配置，则前端发起Ajax请求后，会得到CORS Access Deny，即跨域访问被拒绝。<br>&emsp;&emsp;服务器端需要在增加response的Header：</p>
<blockquote style="border-left: 4px solid red;background: aqua;"><br>    Access-Control-Allow-Origin: ‘*’ 或者指定域名Access-Control-Allow-Origin: ‘<a href="https://eillott.gitee.io&#39;" target="_blank" rel="noopener">https://eillott.gitee.io&#39;</a><br></blockquote>

<p>&emsp;&emsp;<strong> Preflighted Requests </strong>是CORS中一种透明服务器验证机制。预检请求首先需要向另外一个域名的资源发送一个 HTTP OPTIONS 请求头，其目的就是为了判断实际发送的请求是否是安全的。 </p>
<blockquote style="border-left: 4px solid red;background: aqua;"><br>下面的2种情况需要进行预检：<br>1. 简单请求，比如使用Content-Type 为 application/xml 或 text/xml 的 POST 请求。<br>2. 请求中设置自定义头，比如 X-JSON、X-MENGXIANHUI 等。</blockquote>

<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>&emsp;&emsp; 作者想让其他人也可以使用码云认证服务，就将自己nginx反向代理的请求设置为可以跨域访问，CORS跨域的时候，会先发送预检请求(OPTION方法发送)，最开始作者没注意到这点（网上很少有讲到这点），导致一直是跨域访问被拒绝。知道作者加上下面配置，最后才成功的跨域访问。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">if ($request_method = OPTIONS ) &#123;</span><br><span class="line">    return 200;</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>

      
    </div>

    

    
    
    

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/tags/Nginx/" rel="tag"># Nginx</a>
          
            <a href="/tags/跨域/" rel="tag"># 跨域</a>
          
            <a href="/tags/第三方认证/" rel="tag"># 第三方认证</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2018/08/29/Hexo接入码云评论系统/" rel="next" title="Hexo接入码云评论系统">
                <i class="fa fa-chevron-left"></i> Hexo接入码云评论系统
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2018/09/04/IT阅读特殊名词翻译汇集/" rel="prev" title="IT阅读特殊名词翻译汇集">
                IT阅读特殊名词翻译汇集 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>


  </div>


          </div>
          
  
    <div id="giteementDiv"></div>
    <link rel="stylesheet" href="https://giteement.oss-cn-beijing.aliyuncs.com/default.css">
    <script src="https://giteement.oss-cn-beijing.aliyuncs.com/giteement.browser.js"></script>
    <script>
    var giteement = new Giteement({
      id: 20180831172006,
      owner: 'eillott',
      repo: 'eillott',
      backcall_uri: 'https://wudong.tech',
      oauth_uri: 'https://wudong.tech/token',
      oauth: {
        client_id: '11f02c3f93a28488215ae3c3fda47a5b94d8f60aea0fc1640ca88b353a150f6d',
        client_secret: '2786043fc3856082703cb7f8d63066aabecf5673b6cb4460d7343b860a8ddfd1'
      },
    })
    giteement.render('giteementDiv')
    </script>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="https://wudong-tech.oss-cn-beijing.aliyuncs.com/Hexo%E5%92%8C%E7%A0%81%E4%BA%91%E6%90%AD%E5%BB%BA%E5%B1%9E%E4%BA%8E%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/%E5%BD%A4%E5%BD%A41.jpg" alt="吴栋">
            
              <p class="site-author-name" itemprop="name">吴栋</p>
              <p class="site-description motion-element" itemprop="description">技术博客，主攻Java，Python，nodeJS</p>
          </div>

          
            <nav class="site-state motion-element">
              
                <div class="site-state-item site-state-posts">
                
                  <a href="/archives/">
                
                    <span class="site-state-item-count">8</span>
                    <span class="site-state-item-name">日志</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-categories">
                  <a href="/categories/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">4</span>
                    <span class="site-state-item-name">分类</span>
                  </a>
                </div>
              

              
                
                
                <div class="site-state-item site-state-tags">
                  <a href="/tags/index.html">
                    
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                      
                    
                    <span class="site-state-item-count">16</span>
                    <span class="site-state-item-name">标签</span>
                  </a>
                </div>
              
            </nav>
          

          

          

          
          

          
          

          
            
          
          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#背景"><span class="nav-number">1.</span> <span class="nav-text">背景</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Http请求Option"><span class="nav-number">2.</span> <span class="nav-text">Http请求Option</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#Http跨域请求"><span class="nav-number">3.</span> <span class="nav-text">Http跨域请求</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#总结"><span class="nav-number">4.</span> <span class="nav-text">总结</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2022</span>
  <span class="with-love" id="animate">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">吴栋</span>

  

  
</div>




  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动 v3.9.0</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 – <a class="theme-link" target="_blank" href="https://theme-next.org">NexT.Gemini</a> v6.4.0</div>




        
<div class="busuanzi-count">
  <script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>

  
    <span class="site-uv" title="总访客量">
      <i class="fa fa-user"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_uv"></span>
    </span>
  

  
    <span class="site-pv" title="总访问量">
      <i class="fa fa-eye"></i>
      <span class="busuanzi-value" id="busuanzi_value_site_pv"></span>
    </span>
  
</div>









        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    
	
    

    
  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>














  













  
  
    <script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/js/src/utils.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=6.4.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=6.4.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=6.4.0"></script>



  
  <script type="text/javascript" src="/js/src/scrollspy.js?v=6.4.0"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=6.4.0"></script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=6.4.0"></script>



  



  










  




  
  
  
  <link rel="stylesheet" href="/lib/algolia-instant-search/instantsearch.min.css">

  
  
  <script src="/lib/algolia-instant-search/instantsearch.min.js"></script>
  

  <script src="/js/src/algolia-search.js?v=6.4.0"></script>



  

  

  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>


  

  
  

  

  

  

  

  

</body>
</html>
